package com.trz.cqrs.core.enums;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum EventState {

    CREATED("已创建"),
    PROCESSING("处理中（事件锁止）"),
    UNSUPPORTED("不支持"),
    INTERRUPTED("已终止（系统取消）"),
    TERMINATED("已结束（人工取消）"),
    FAILED("已失败"),
    SUCCEEDED("已成功");

    private final String value;

    public boolean isSucceeded() {
        return this == SUCCEEDED;
    }

    @Override
    public String toString() {
        return value;
    }

}
